package com.kuangstudy.common.date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;

/**
 * ClassName: Demo4
 * date: 2021/07/14 19:36:55
 *
 * @author zlk
 */
public class Demo4 {
    public static void main(String[] args) {
        /**
         * arraycopy
         */
        int[] array = {20,34,45};
        int[] ints = new int[8];
        System.arraycopy(array,0,ints,0,array.length);
        for (int anInt : ints) {
            System.out.println(anInt);
        }

        /*Arrays.copyOf()复制数组 底层也是调用的System.arraycopy*/
        int[] ints1 = Arrays.copyOf(array, array.length);
        for (int i : ints1) {
            System.out.println(i);
        }

        /*打印时间戳*/
        System.out.println(System.currentTimeMillis());
        /*0表示正常退出jvm*/
        System.exit(0);
        System.out.println("aaa");

    }
}
